package com.xydtech.workflow.service;

import com.xydtech.workflow.domain.WflFlowstep;

import java.util.List;

/**
 * 流程节点配置Service接口
 *
 * @author JHON
 * @date 2021-05-07
 */
public interface IWflFlowstepService {

    /**
     * 查询流程节点配置列表
     *
     * @param wflFlowstep 流程节点配置
     * @return 流程节点配置集合
     */
    public List<WflFlowstep> selectWflFlowstepList(WflFlowstep wflFlowstep);

    /**
     * 查询流程节点配置
     *
     * @param versionId 流程节点配置ID
     * @return 流程节点配置
     */
    public List<WflFlowstep> selectWflFlowstepById(Long versionId);

    /**
     *根据版本号和顺序号查询流程节点信息
     * @Title: selectWflFlowstepByVersionIdAndOrderNum
     * @param versionId
     * @param orderNum
     * @return com.xydtech.workflow.domain.WflFlowstep
     * @exception
     * @author JHON
     * @Date 2021/5/28 18:03
     **/
    public WflFlowstep selectWflFlowstepByVersionIdAndOrderNum(Long versionId, Long orderNum);

    /**
     * 新增流程节点配置
     *
     * @param list 流程节点配置
     * @return 结果
     */
    public int insertWflFlowstep(List<WflFlowstep> list);

    /**
     * 修改流程节点配置
     *
     * @param wflFlowstep 流程节点配置
     * @return 结果
     */
    public int updateWflFlowstep(WflFlowstep wflFlowstep);

    /**
     *向上移动流程节点时修改被替换位置节点顺序号
     * @Title: updateUpstepOrderNumByVersionIdAndOrderNum
     * @param wflFlowstep
     * @return int
     * @exception
     * @author JHON
     * @Date 2021/5/26 16:39
     **/
    public int updateUpstepOrderNumByVersionIdAndOrderNum(WflFlowstep wflFlowstep);

    /**
     *向下移动流程节点时修改被替换位置节点顺序号
     * @Title: updateDownstepOrderNumByVersionIdAndOrderNum
     * @param wflFlowstep
     * @return int
     * @exception
     * @author JHON
     * @Date 2021/5/26 16:39
     **/
    public int updateDownstepOrderNumByVersionIdAndOrderNum(WflFlowstep wflFlowstep);

    /**
     *批量修改流程步骤信息
     * @Title: bathUpdateWflFlowstep
     * @param list
     * @return int
     * @exception
     * @author JHON
     * @Date 2021/5/26 14:17
     **/
    public int bathUpdateWflFlowstep(List<WflFlowstep> list);

    /**
     *批量删除流程节点配置
     * @Title: deleteWflFlowstepByVersionIdAndStepIds
     * @param versionId
     * @param list
     * @return int
     * @exception
     * @author JHON
     * @Date 2021/5/26 13:07
     **/
    public int deleteWflFlowstepByVersionIdAndStepIds(Long versionId, List<WflFlowstep> list);

    /**
     *新增流程节点原有结束节点更新为中间节点
     * @Title: updateWflFlowstepType
     * @param versionId
     * @return int
     * @exception
     * @author JHON
     * @Date 2021/5/26 13:59
     **/
    public int updateWflFlowstepType(Long versionId);

}
